package com.student.entities;

import java.util.List;

public class OrderEntity {
	private int id = 0;
	private String no = "";
	private String detail = "";
	private int sellerId = 0;
	private String time = null;
	private String toUser = "";
	private String toAddr = "";
	private String toTime = "";
	private int state = 0;
	// 这个属性用于数据库操作
	private List<OrderItemEntity> orderItemList = null;
	// 这个属性用于显示操作
	private List<CartEntity> cartList = null;

	public OrderEntity(int id, String no, String detail, int sellerId,
			String time, String toUser, String toAddr, String toTime,
			int state, List<OrderItemEntity> orderItemList,
			List<CartEntity> cartList) {
		super();
		this.id = id;
		this.no = no;
		this.detail = detail;
		this.sellerId = sellerId;
		this.time = time;
		this.toUser = toUser;
		this.toAddr = toAddr;
		this.toTime = toTime;
		this.state = state;
		this.orderItemList = orderItemList;
		this.cartList = cartList;
	}

	public OrderEntity() {
		super();
	}

	public int getId() {
		return id;
	}

	public String getNo() {
		return no;
	}

	public String getDetail() {
		return detail;
	}

	public int getSellerId() {
		return sellerId;
	}

	public String getTime() {
		return time;
	}

	public String getToUser() {
		return toUser;
	}

	public String getToAddr() {
		return toAddr;
	}

	public String getToTime() {
		return toTime;
	}

	public int getState() {
		return state;
	}

	public List<OrderItemEntity> getOrderItemList() {
		return orderItemList;
	}

	public List<CartEntity> getCartList() {
		return cartList;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public void setSellerId(int sellerId) {
		this.sellerId = sellerId;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public void setToUser(String toUser) {
		this.toUser = toUser;
	}

	public void setToAddr(String toAddr) {
		this.toAddr = toAddr;
	}

	public void setToTime(String toTime) {
		this.toTime = toTime;
	}

	public void setState(int state) {
		this.state = state;
	}

	public void setOrderItemList(List<OrderItemEntity> orderItemList) {
		this.orderItemList = orderItemList;
	}

	public void setCartList(List<CartEntity> cartList) {
		this.cartList = cartList;
	}

	@Override
	public String toString() {
		return "OrderEntity [id=" + id + ", no=" + no + ", detail=" + detail
				+ ", sellerId=" + sellerId + ", time=" + time + ", toUser="
				+ toUser + ", toAddr=" + toAddr + ", toTime=" + toTime
				+ ", state=" + state + ", orderItemList=" + orderItemList
				+ ", cartList=" + cartList + "]";
	}

}
